<?php defined('IN_DC') or exit('Access Denied'); ?>
<?php $DATA = get("SELECT * FROM `dc_area` WHERE LENGTH(areacode)=2", 100, 0, "", "");foreach($DATA AS $n => $a) { $n++;?>
    <h2 style="color:red;"><?php echo $a['areaname'];?></h2>
    <?php $DATA = get("SELECT * FROM `dc_area` WHERE `areacode` LIKE '$a[areacode]%' AND `areacode`!='$a[areacode]' AND LENGTH(areacode)=4 ", 100, 0, "", "");foreach($DATA AS $n => $b) { $n++;?>
        <div style="margin-left:50px;">
        <p style="color:blue;font-weight:800;"><?php echo $b['areaname'];?></p>
        <?php $DATA = get("SELECT * FROM `dc_area` WHERE `areacode` LIKE '$b[areacode]%' AND `areacode`!='$b[areacode]' AND LENGTH(areacode)=6", 100, 0, "", "");foreach($DATA AS $n => $c) { $n++;?>
            <span><?php echo $c['areaname'];?></span> 
        <?php } unset($DATA); ?>
        </div>
    <?php } unset($DATA); ?>
<?php } unset($DATA); ?>
